package com.ego.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ego.common.vo.PageVo;
import com.ego.ware.po.Purchase;
import com.ego.ware.vo.PurchaseFinishedVo;
import com.ego.ware.vo.PurchaseMergeVo;
import com.ego.ware.vo.PurchaseSearchVo;
import com.ego.ware.vo.PurchaseVo;

import java.util.List;

/**
 * @program: ego
 * @description 采购信息服务层
 * @author KamTang
 * @date 2022-11-13 13:30:29
 */
public interface PurchaseService extends IService<Purchase> {
    /**
     * 搜索采购单
     * @param searchVo @see
     * @return 采购信息
     * @see PurchaseSearchVo
     */
    PageVo<Purchase> search(PurchaseSearchVo searchVo);

    /**
     * 展示未被接收的采购单
     * @return @see
     * @see Purchase
     */
    List<Purchase> unreceived();

    /**
     * 接收采购单
     * @param ids 采购单ID
     * @return 执行是否成功
     */
    boolean receive(List<Long> ids);

    /**
     * 完成采购
     * @param finished @see
     * @see PurchaseFinishedVo
     */
    void finished(PurchaseFinishedVo finished);

    /**
     * 展示当前管理员涉及和可能涉及的采购单
     * @param adminId 管理员id
     * @return 采购单列表
     */
    List<PurchaseVo> list(Long adminId);
}

